home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Golf Digest's Best Places to Play
/
Golf Digest's Best Places to Play.iso
/
diamond
/
dbrs_ibm.dir
/
00055_Script_FreeScript
< prev
next >
Wrap
Text File
|
1995-05-15
|
3KB
|
101 lines
on exitFrame
go to marker(0)+4
end
on mouseDown
set ButtonNum=the clickOn
if ButtonNum>0 then
set ButtonName=the name of cast (the castNum of sprite ButtonNum)
if (ButtonNum > 2) and (ButtonNum < 13) then
AddDigit(ButtonNum)
end if
if ButtonNum = 2 then
CheckCode
end if
if chars(ButtonName,1,5) = "Rules" then
if pressBtn(ButtonNum) then
allPuppetsOff
updateStage
play "Free2"
end if
end if
if chars(ButtonName,1,6) = "ToMain" then
if PressBtn(ButtonNum) then
AllPuppetsOff
updateStage
go to marker(0)+5
end if
end if
if chars(ButtonName,1,4) = "Help" then
if PressBtn(ButtonNum) then
showHelp
puppetsprite ButtonNum, true
set the castNum of sprite ButtonNum to the number of cast (ButtonName)
puppetsprite ButtonNum, false
end if
end if
end if
end mouseDown
on AddDigit ButtonNum
put ButtonNum-2 into theDigit
if theDigit=10 then put 0 into theDigit
puppetsprite ButtonNum, true
set the castNum of sprite ButtonNum to the number of cast ("SalKey" & theDigit & "Down")
updateStage
set filledTo=0
repeat with i=13 to 16
if the castNum of sprite i <> the number of cast ("SalDigitEmpty") then set filledTo=i
end repeat
if filledTo=16 then
repeat with i=13 to 16
puppetsprite i, true
set the castNum of sprite i to the number of cast ("SalDigitEmpty")
end repeat
set filledTo=0
end if
if filledTo=0 then
set thePlace=13
else
set thePlace=filledTo+1
end if
puppetsprite thePlace, true
set the castNum of sprite thePlace to the number of cast ("SalDigit" & theDigit)
set the castNum of sprite ButtonNum to the number of cast ("SalKey" & theDigit)
end AddDigit
on CheckCode
puppetSprite 2, true
set the castNum of sprite 2 to the number of cast ("SalKeyEnterDown")
updateStage
put "" into theCode
repeat with i=13 to 16
put the last char of (the name of cast (the castNum of sprite i)) after theCode
end repeat
put theCode
if theCode="5893" then
AllPuppetsOff
puppetsound "FirstCutYeahSound"
updateStage
puppetTransition 11,1,10, false
go to "Free1"
else
repeat with i=13 to 16
puppetsprite i, true
set the castNum of sprite i to the number of cast ("SalDigitEmpty")
end repeat
set the castNum of sprite 2 to the number of cast ("SalKeyEnter")
puppetsound "FreeWrongSound"
updateStage
repeat while soundbusy(1)
nothing
end repeat
puppetsound "FirstCutOoohSound"
end if
end CheckCode